#ifndef TCPTOOL_H
#define TCPTOOL_H
#include "childthread.h"
#include <QObject>
#include <QTcpServer>
#include <QTcpSocket>
#include <qsqldatabase.h>
#include <QThreadPool>
class tcpTool:public QObject
{
    Q_OBJECT
public:
    tcpTool(QObject *parent=nullptr);

    const QSqlDatabase *getDb() const;
    void setDb(const QSqlDatabase *newDb);

private:
    QString ip="127.0.0.1";
    int port=10999;
    QTcpServer *tcp_server;
    const QSqlDatabase *db;
};

#endif // TCPTOOL_H
